package config;

import com.google.inject.AbstractModule;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Singleton;
import com.google.inject.Stage;
import play.Play;
import play.modules.guice.GuiceSupport;
import services.image.GoogleSearchServiceImpl;
import services.image.ImageSearchService;

public class GuiceConfig extends GuiceSupport {

	@Override
	protected Injector configure() {
		//El plugin de guice para play omite el parámetro stage.
		Stage stage = Play.mode.isDev()?Stage.DEVELOPMENT : Stage.PRODUCTION;
		return Guice.createInjector(stage, new CustomModule());
	}

}
